
public class Consumidor implements Runnable {
	
	private Buffer buffer;
	
	public Consumidor(Buffer buffer) {
		this.buffer = buffer;		
	}

	public void run() {
		while (true) {
			try {
				System.out.println("Tentando ler do buffer");
				Integer retorno = buffer.removeElement();
				System.out.println("Buffer me retornou "+retorno+" agora vou usar esse valor");								
			} catch (Exception e) {
				System.out.println(e.getMessage());	
			}											
		}
	}	
}
